package br.com.r1.jpastandalone.pk;

import java.io.Serializable;

public class UserPk implements Serializable{

	private static final long serialVersionUID = 1L;
	private String lastName;
	private String sn;

	public UserPk() {
	}

	public UserPk(String lastName, String sn) {
		this.lastName = lastName;
		this.sn = sn;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getSn() {
		return sn;
	}

	public void setSn(String sn) {
		this.sn = sn;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((lastName == null) ? 0 : lastName.hashCode());
		result = prime * result + ((sn == null) ? 0 : sn.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		UserPk other = (UserPk) obj;
		if (lastName == null) {
			if (other.lastName != null)
				return false;
		} else if (!lastName.equals(other.lastName))
			return false;
		if (sn == null) {
			if (other.sn != null)
				return false;
		} else if (!sn.equals(other.sn))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "UserPk [lastName=" + lastName + ", sn=" + sn + "]";
	}
}